def sorted_by_create_time(cls):
    def inner(*args,**kwargs):
        objlist=[]
        for obj in globals().values():
            if isinstance(obj,cls):
                objlist.append(str(obj))
        print(objlist)
        return cls(*args,**kwargs)
    return inner
@sorted_by_create_time
class Test(object):
    def __init__(self):
        pass